library(pacman)
pacman::p_load(rstudioapi)
setwd(dirname(getActiveDocumentContext()$path))
rm(list=ls())
options(warn = -1) #suppress unnecessary warnings
################################################################################

print("current file: 1_import_shapefiles.R")
source("1_import_shapefiles.R")

print("current file: 2_prep_faostat.R")
source("2_prep_faostat.R")

print("current file: 3_prep_geographicunits.R")
source("3_prep_geographicunits.R")

print("current file: 4_standardize_shapefiles.R")
source("4_standardize_shapefiles.R")

print("current file: 5_prep_trase.R")
source("5_prep_trase.R")

print("current file: 6_extract_carbonstocks.R")
source("6_extract_carbonstocks.R")

print("current file: 7_extract_faogaez.R")
source("7_extract_faogaez.R")

print("current file: 8_prep_distance_matrix.R")
source("8_prep_distance_matrix.R")

print("current file: 9_clean_cropland.R")
source("9_clean_cropland.R")

print("current file: 10_clean_land_values.R")
source("10_clean_land_values.R")

print("current file: 11_prep_cropland.R")
source("11_prep_cropland.R")

print("current file: 12_clean_landuse.R")
source("12_clean_landuse.R")

print("current file: 13_clean_livestock.R")
source("13_clean_livestock.R")

print("current file: 14_clean_size.R")
source("14_clean_size.R")

print("current file: 15_clean_labor.R")
source("15_clean_labor.R")

print("current file: 16_prep_farmprices_argentina.R")
source("16_prep_farmprices_argentina.R")

print("current file: 17_prep_farmprices_cattle.R")
source("17_prep_farmprices_cattle.R")

print("current file: 18_prep_farmprices_crops.R")
source("18_prep_farmprices_crops.R")

print("current file: 19_prep_employment.R")
source("19_prep_employment.R")

print("current file: 20_prep_intermediates.R")
source("20_prep_intermediates.R")

print("current file: 21_prep_production.R")
source("21_prep_production.R")

print("current file: 22_prep_productivity_cattle.R")
source("22_prep_productivity_cattle.R")

print("current file: 23_prep_trase_hubs.R")
source("23_prep_trase_hubs.R")

print("current file: 24_prep_distance_to_hub.R")
source("24_prep_distance_to_hub.R")

################################################################################
options(warn = 0) #reset default warnings

